package com.zyy.controller;

import com.zyy.controller.frontend.MainPageController;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @Author: yu.zhou
 * @DateTime: 2023/01/03 14:35
 */
@WebServlet("/")
public class DispatcherServlet extends HttpServlet {

    private static final String GET = "GET";

    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

        String method = req.getMethod();
        String requestPath = req.getServletPath();
        if ("/frontend/getUserOrder".equals(requestPath) && GET.equals(method)) {
            new MainPageController().getMainInfo(req, resp);
        }
    }
}
